package io;

import java.io.*;

public class dasd {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
//        String name="马嘉豪";
//        int age=20;
//        String ganser="女";
//        String [] otherInfo={"吃饭","做饭"};
//        Student zs=new Student(name,age,ganser,otherInfo);
//        FileOutputStream fos=new FileOutputStream("xie.txt");
//        ObjectOutputStream oos=new ObjectOutputStream(fos);
//        oos.writeObject(zs);
//        System.out.println("写入完毕");
//        oos.close();
        FileInputStream fis=new FileInputStream("xie.txt");
        ObjectInputStream ois=new ObjectInputStream(fis);
        Object du=ois.readObject();
        Student zs= (Student) du;
        System.out.println(zs);
        ois.close();


    }
}
